//
//  CornerButton.swift
//  ChargeManager
//
//  Created by solarke_apple_mini_1 on 16/9/2.
//  Copyright © 2016年 石家庄科林电气股份有限公司. All rights reserved.
//

import UIKit

@IBDesignable class CornerButton: UIButton {
    @IBInspectable var cornerRadius: CGFloat {
        get {
            return layer.cornerRadius
        }
        set {
            layer.cornerRadius = newValue
            layer.masksToBounds = true
        }
    }
    @IBInspectable var borderColor: UIColor! {
        get {
            return nil
        }
        set {
            self.layer.borderColor = newValue.cgColor
        }
    }
    @IBInspectable var borderWidth: CGFloat {
        get {
            return self.layer.borderWidth
        }
        set {
            self.layer.borderWidth = newValue
        }
    }
}
